﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Eagle.Web.TagFactory
{
    /// <summary>
    /// A标签生成类
    /// </summary>
    public class A
    {
        /// <summary>
        /// 生成A标签
        /// </summary>
        /// <param name="id">id</param>
        /// <param name="linkName">链接名称，可以是图片标签</param>
        /// <param name="href">地址</param>
        /// <param name="className">应用的类名</param>
        /// <param name="properties">其他属性</param>
        /// <returns></returns>
        public static string Create(string id, string linkName,string href, string className, string properties)
        {
            return "<a id=\"" + id + "\" src=\"" + href + "\"  class=\"" + className + "\" " + properties + " >"+linkName+"</a>";
        }

        /// <summary>
        /// 生成A标签
        /// </summary>
        /// <param name="id">id</param>
        /// <param name="linkName">链接名称，可以是图片标签</param>
        /// <param name="href">地址</param>
        /// <param name="className">应用的类名</param>
        /// <returns></returns>
        public static string Create(string id, string linkName,string href, string className)
        {
            return Create(id,linkName,href, className, "");
        }
        /// <summary>
        /// 生成A标签
        /// </summary>
        /// <param name="id">id</param>
        /// <param name="linkName">链接名称，可以是图片标签</param>
        /// <param name="href">地址</param>
        /// <returns></returns>
        public static string Create(string id, string linkName, string href)
        {
            return Create(id, linkName, href,"", "");
        }
    }
}
